home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / f90 / length.z / length
Encoding:
Text File  |  2002-10-03  |  2.6 KB  |  75 lines

  1. LENGTH(3I)                                            Last changed: 4-13-99
  2.  
  3.  
  4. NNAAMMEE
  5.      LLEENNGGTTHH - Returns the number of words transferred
  6.  
  7. SSYYNNOOPPSSIISS
  8.      LLEENNGGTTHH (([II==]_i))
  9.  
  10. IIMMPPLLEEMMEENNTTAATTIIOONN
  11.      UNICOS, UNICOS/mk, IRIX systems
  12.  
  13.      CF90, MIPSpro 7 Fortran 90
  14.  
  15. SSTTAANNDDAARRDDSS
  16.      Fortran extension
  17.  
  18. DDEESSCCRRIIPPTTIIOONN
  19.      LLEENNGGTTHH returns the length (in words) of a BBUUFFFFEERR IINN or BBUUFFFFEERR OOUUTT
  20.      statement transfer.  It accepts the following argument:
  21.  
  22.      _i         Must be a nonnegative integer or Boolean value.  Represents
  23.                a unit number.
  24.  
  25.                If _i is an integer, _i must be of KKIINNDD==88 on UNICOS and
  26.                UNICOS/mk systems, or of KKIINNDD==44 on IRIX systems.
  27.  
  28.      LLEENNGGTTHH is an elemental function.  The name of this intrinsic cannot be
  29.      passed as an argument.
  30.  
  31. RREETTUURRNN VVAALLUUEESS
  32.      The value returned is of type default integer.
  33.  
  34.      If the LLEENNGGTTHH function is called during the execution of asynchronous
  35.      I/O with BBUUFFFFEERR IINN or BBUUFFFFEERR OOUUTT, the execution sequence is delayed
  36.      until the transfer is complete.  LLEENNGGTTHH then returns the number of
  37.      words successfully transferred.  On UNICOS and UNICOS/mk systems, the
  38.      length is specified in Cray words.  On IRIX systems, the length is
  39.      specified in the default word size.
  40.  
  41.      Programs that transfer characters or data from a medium that supports
  42.      partial-word I/O cannot detect partial-word transfers.  The return
  43.      value is rounded up to a word count in these cases.
  44.  
  45.      The return value is 0 under the following two conditions:
  46.  
  47.      * An end-of-file or error occurs
  48.  
  49.      * It is following a read or write of a zero-length record.
  50.  
  51.      UUNNIITT(3I) should be used prior to LLEENNGGTTHH to properly distinguish these
  52.      previous two cases.
  53.  
  54. EEXXAAMMPPLLEESS
  55.           PROGRAM PGM
  56.              DIMENSION V(16384)
  57.           10 BUFFER IN (32,-1) (V(1),V(16384))
  58.              X= UNIT(32)
  59.              K= LENGTH(32)
  60.              IF (X .GE. 0.0) GOTO 14
  61.           11 DO 12  I=1,K,1
  62.           12 IF (V(I) .EQ. 'KEY') GOTO 13
  63.              IF (X .EQ. -1.0) GOTO 10
  64.              STOP
  65.           13 ...
  66.              ...
  67.           14 CONTINUE
  68.              END
  69.  
  70. SSEEEE AALLSSOO
  71.      UUNNIITT(3I)
  72.  
  73.      _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l for the printed version of this
  74.      man page.
  75.